package gagak.framework.web.exception;

import gagak.framework.web.annonation.Nullable;
import gagak.framework.web.utils.NestedExceptionUtils;

import javax.servlet.ServletException;

/*
 * @program: ce
 * @description:
 * @author: houhong
 * @create: 2022-12-01 22:25
 */
public class NestedServletException  extends ServletException {

    private static final long serialVersionUID = -5292377985529381145L;

    static {

        NestedExceptionUtils.class.getName();
    }



    public NestedServletException(String msg) {
        super(msg);
    }


    public NestedServletException(@Nullable String msg, @Nullable Throwable cause) {
        super(msg, cause);
    }


    /*
     * Return the detail message, including the message from the nested exception
     * if there is one.
     */
    @Override
    @Nullable
    public String getMessage() {
        return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
    }

}